<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:insert="~{include :: header('编辑课程专集')}" />
</head>
<body class="hold-transition">
<div class="container-fluid mt-2 mb-2">
    <form class="form-horizontal m" id="form-course-album">
        <input type="hidden" name="id" th:value="${courseAlbum.id}">
        <p>
            <label>
                专集基本属性（<span style="color: red; ">*</span>&nbsp;为必填项）
            </label>
        </p>
        <div class="form-group row">
            <label class="col-sm-2 col-form-label text-sm-right">
                <span style="color:red;">*</span>&nbsp;分类名称
            </label>
            <div class="col-sm-4">
                <input type="text" name="name" th:value="${courseAlbum.name}" class="form-control" />
            </div>
        </div>
        <div class="form-group row">
            <label class="col-sm-2 col-form-label text-sm-right">
                <span style="color:red;">*</span>&nbsp;更多跳转
            </label>
            <div class="col-sm-8">
                <input type="text" name="link" th:value="${courseAlbum.link }" id="link" class="form-control" />
            </div>
        </div>
        <div class="form-group row">
            <label class="col-sm-2 col-form-label text-sm-right">
                <span style="color: red; ">*</span>&nbsp;课程数量
            </label>
            <div class="col-sm-4">
                <input type="text" name="courseNum" th:value="${courseAlbum.courseNum }" id="courseNum" class="form-control" />
            </div>
        </div>
        <div class="form-group row">
            <label class="col-sm-2 col-form-label text-sm-right">描述</label>
            <div class="col-sm-8">
                <textarea rows="3" cols="80" name="description" id="description" th:text="${courseAlbum.description}" class="form-control"></textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:insert="~{include :: footer}" />
<script type="text/javascript">
    var prefix = "/course/album";
    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-course-album").serializeArray();
            $.operate.save(prefix + "/save.json", data);
        }
    }
</script>
</body>
</html>